/*
 * An XML document type.
 * Localname: search
 * Namespace: http://xscraper.openjawtech.com/ws/xsd
 * Java type: com.openjawtech.xscraper.ws.xsd.SearchDocument
 *
 * Automatically generated - do not modify.
 */
package com.openjawtech.xscraper.ws.xsd.impl;
/**
 * A document containing one search(@http://xscraper.openjawtech.com/ws/xsd) element.
 *
 * This is a complex type.
 */
public class SearchDocumentImpl_1 extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.openjawtech.xscraper.ws.xsd.SearchDocument
{
    
    public SearchDocumentImpl_1(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName SEARCH$0 = 
        new javax.xml.namespace.QName("http://xscraper.openjawtech.com/ws/xsd", "search");
    
    
    /**
     * Gets the "search" element
     */
    public com.openjawtech.xscraper.ws.xsd.SearchDocument.Search getSearch()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.openjawtech.xscraper.ws.xsd.SearchDocument.Search target = null;
            target = (com.openjawtech.xscraper.ws.xsd.SearchDocument.Search)get_store().find_element_user(SEARCH$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "search" element
     */
    public void setSearch(com.openjawtech.xscraper.ws.xsd.SearchDocument.Search search)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.openjawtech.xscraper.ws.xsd.SearchDocument.Search target = null;
            target = (com.openjawtech.xscraper.ws.xsd.SearchDocument.Search)get_store().find_element_user(SEARCH$0, 0);
            if (target == null)
            {
                target = (com.openjawtech.xscraper.ws.xsd.SearchDocument.Search)get_store().add_element_user(SEARCH$0);
            }
            target.set(search);
        }
    }
    
    /**
     * Appends and returns a new empty "search" element
     */
    public com.openjawtech.xscraper.ws.xsd.SearchDocument.Search addNewSearch()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.openjawtech.xscraper.ws.xsd.SearchDocument.Search target = null;
            target = (com.openjawtech.xscraper.ws.xsd.SearchDocument.Search)get_store().add_element_user(SEARCH$0);
            return target;
        }
    }
    /**
     * An XML search(@http://xscraper.openjawtech.com/ws/xsd).
     *
     * This is a complex type.
     */
    public static class SearchImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.openjawtech.xscraper.ws.xsd.SearchDocument.Search
    {
        
        public SearchImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType);
        }
        
        private static final javax.xml.namespace.QName FLIGHTS$0 = 
            new javax.xml.namespace.QName("http://xscraper.openjawtech.com/schema", "flights");
        
        
        /**
         * Gets the "flights" element
         */
        public com.openjawtech.xscraper.schema.FlightsType getFlights()
        {
            synchronized (monitor())
            {
                check_orphaned();
                com.openjawtech.xscraper.schema.FlightsType target = null;
                target = (com.openjawtech.xscraper.schema.FlightsType)get_store().find_element_user(FLIGHTS$0, 0);
                if (target == null)
                {
                    return null;
                }
                return target;
            }
        }
        
        /**
         * Sets the "flights" element
         */
        public void setFlights(com.openjawtech.xscraper.schema.FlightsType flights)
        {
            synchronized (monitor())
            {
                check_orphaned();
                com.openjawtech.xscraper.schema.FlightsType target = null;
                target = (com.openjawtech.xscraper.schema.FlightsType)get_store().find_element_user(FLIGHTS$0, 0);
                if (target == null)
                {
                    target = (com.openjawtech.xscraper.schema.FlightsType)get_store().add_element_user(FLIGHTS$0);
                }
                target.set(flights);
            }
        }
        
        /**
         * Appends and returns a new empty "flights" element
         */
        public com.openjawtech.xscraper.schema.FlightsType addNewFlights()
        {
            synchronized (monitor())
            {
                check_orphaned();
                com.openjawtech.xscraper.schema.FlightsType target = null;
                target = (com.openjawtech.xscraper.schema.FlightsType)get_store().add_element_user(FLIGHTS$0);
                return target;
            }
        }
    }
}
